<div th:fragment="frag(list)">
	<div class="modal fade" th:id="|${list.app.domprefix}-${list.id}-modal-create-relation|">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">创建对象关系的同时创建视图属性</h4>
				</div>
				<div class="modal-body">
					<input type="hidden" name="app">
					<input type="hidden" name="viewproperty">
					<div class="box box-primary">
						<div class="box-body">
							<div class="form-group">
								<label class="control-label">名称</label>
								<input class="form-control" name="name" placeholder="请输入关系名称">
							</div>
							<div class="form-group">
								<label class="control-label">类型</label>
								<div class="radio">
									<label><input type="radio" value="M21" name="type" checked>多对一</label>
									<label><input type="radio" value="M2M" name="type">多对多</label>
									<label><input type="radio" value="M2CM" name="type">M2CM</label>
								</div>
							</div>
							<div class="form-group">
								<label for="|${list.app.domprefix}-relatedobject-search|" class="control-label">关联对象</label>
								<input th:id="|${list.app.domprefix}-relatedobject|" type="hidden" data-app-selectorsingle="true" name="relatedobjectid" 
									data-biginputor data-biginputor-dataurl="/meta/man/biz/object" data-biginputor-searchurl="/meta/man/biz/object">
								<div class="form-control padding">
								    <input th:id="|${list.app.domprefix}-relatedobject-search|" style="height:22px;width:130px;padding:2px" placeholder="请输入查询内容"
								   	   th:list="|${list.app.domprefix}-relatedobject-list|">
								    <datalist th:id="|${list.app.domprefix}-relatedobject-list|" />
								</div>
							</div>
							<div class="form-group">
								<label class="control-label">默认值</label>
								<select class="form-control" name='default'>
									<option value>请选择默认值...</option>
									<option value='创建人'>创建人</option>
									<option value='修改人'>修改人</option>
									<option value='${bigUser.id}'>当前用户</option>
								</select>
							</div>
						</div>
					</div>
					<div>
						<div class="box box-primary">
							<div class="box-body">
								<div class="form-group" data-bigradio>
									<label><input type="checkbox" value="list"
										name="viewtype"> 添加到列表</label>
								</div>
								<div class="hidden" data-bigradio-target="viewtype.list">
									<div class="form-group">
										<label class="control-label">控件</label>
										<select class="form-control" name='listinputtype'>
											<option value="hidden">hidden</option>
											<option value="textfield" selected>textfield</option>
										</select>
									</div>
									<div class="form-group">
										<label class="control-label">宽度</label>
										<div class="row">
											<div class="col-sm-2">
												<div class="radio">
													<label><input type="radio" value="50"
														name="listwidth">小</label>
												</div>
											</div>
											<div class="col-sm-2">
												<div class="radio">
													<label><input type="radio" value="100"
														name="listwidth" checked>中</label>
												</div>
											</div>
											<div class="col-sm-2">
												<div class="radio">
													<label><input type="radio" value="200"
														name="listwidth">大</label>
												</div>
											</div>
											<div class="col-sm-2">
												<div class="radio">
													<label><input type="radio" value="300"
														name="listwidth">巨大</label>
												</div>
											</div>
											<div class="col-sm-2">
												<div class="radio">
													<label><input type="radio" value="-1"
														name="listwidth">自适应</label>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="box box-primary">
							<div class="box-body">
								<div class="form-group" data-bigradio>
									<label><input type="checkbox" value="form" name="viewtype"> 添加到表单</label>
								</div>
								<div data-bigradio-target="viewtype.form" class="hidden">
									<div class="form-group">
										<div class="checkbox">
											<label><input type="checkbox" name="required" value=1>  必填</label>
											<label><input type="checkbox" name="readonly" value=1>  只读</label>
											<label><input type="checkbox" name="submit" value=1 checked>  提交</label>
											<label><input type="checkbox" name="allform" value=1>  添加到所有表单</label>
										</div>
									</div>
									<div class="form-group">
										<label class="control-label">表单加载默认值</label>
										<div class="checkbox">
											<label><input type="checkbox" name="forminitreplaceempty" value=1>  空值时替换</label>
											<label><input type="checkbox" name="forminitreplacevalue" value=1>  非空时替换</label>
											<label><input name="forminitvalue" placeholder="请输入表单加载默认值"></label>
										</div>
									</div>
									<div class="form-group">
										<label class="control-label">表单提交默认值</label>
										<div class="checkbox">
											<label><input type="checkbox" name="formsubmitreplaceempty" value=1>  空值时替换</label>
											<label><input type="checkbox" name="formsubmitreplacevalue" value=1>  非空时替换</label>
											<label><input name="formsubmitvalue" placeholder="请输入表单提交默认值"></label>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="box box-primary">
							<div class="box-body">
								<div class="form-group" data-bigradio>
									<label><input type="checkbox" value="search"
										name="viewtype"> 添加到查询</label>
								</div>
								<div data-bigradio-target="viewtype.search" class="hidden">
									<div class="form-group" data-bigradio>
										<label class="control-label">查询类型</label>
										<div class="radio" >
											<label><input type="radio" name="comparetype" value="equal" checked> 完全匹配</label>
											<label><input type="radio" name="comparetype" value="expression"> 表达式匹配</label>
											<label><input type="radio" name="comparetype" value="select-expression"> 选择表达式匹配</label>
											<label data-bigradio-target="comparetype.expression" class="hidden"><input name="searchexpression" placeholder="请输入查询表达式"></label>
											<label data-bigradio-target="comparetype.select-expression" class="hidden"><input name="searchdictionarytype" placeholder="请输入数据字典类型"></label>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default pull-left"
						data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary fa fa-plus-circle">
						提交</button>
				</div>
			</div>
		</div>
	</div>
</div>
